<template>
  <div class="app-container">
    <el-tabs :value="activeTab" @tab-click="changeTab">
      <el-tab-pane label="数据补录" name="one">
        <data-add-record v-show="activeTab==='one'"  />
      </el-tab-pane>
      <el-tab-pane label="任务删除" name="two">
        <task-delete v-show="activeTab==='two'" />
      </el-tab-pane>
      <el-tab-pane label="ES数据" name="three">
        <es-data v-show="activeTab==='three'" />
      </el-tab-pane>
      <el-tab-pane label="三方实时数据" name="four">
        <third-data v-show="activeTab==='four'" />
      </el-tab-pane>
      <el-tab-pane label="注单数据" name="five">
        <notice-order-data v-show="activeTab==='five'"></notice-order-data>
      </el-tab-pane>
      <el-tab-pane label="注单比对" name="six">
        <notice-order-compare v-show="activeTab==='six'"></notice-order-compare>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import DataAddRecord from './dataAddRecord';
import TaskDelete from './taskDelete';
import EsData from './esData';
import ThirdData from './thirdRealTimeData';
import NoticeOrderData from './noticeOrderData';
import NoticeOrderCompare from './noticeOrderCompare';

export default {
  name: 'game-add-data',
  components: {
    DataAddRecord,
    TaskDelete,
    EsData,
    ThirdData,
    NoticeOrderData,
    NoticeOrderCompare,
  },
  data() {
    return {
      activeTab: 'one',
    };
  },
  mounted() { // tab页记录访问日志
    this.$store.dispatch(types.SAVE_OPERATION_LOG, { content: _.getContent(this.$route, '数据补录', true) });
  },
  methods: {
    changeTab(tab) {
      this.activeTab = tab.name;
      // tab页记录访问日志;
      this.$store.dispatch(types.SAVE_OPERATION_LOG, { content: _.getContent(this.$route, tab.label, true) });
    },
  },
};
</script>

<style lang="scss" scoped>
</style>
